package com.ruoyi.web.controller.api;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.xsp.domain.AdCarousel;
import com.ruoyi.xsp.service.IAdCarouselService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 广告管理Controller
 * 
 * @author zhiminhu
 * @date 2021-03-21
 */
@Api(value = "广告banner管理",tags = "广告banner管理")
@RestController
@RequestMapping("/api/carousel")
public class AdCarouselApiController extends BaseApiController
{

    @Autowired
    private IAdCarouselService adCarouselService;

    /**
     * 查询广告管理列表
     */
    @ApiOperation("广告列表")
    @GetMapping("/list")
    @ResponseBody
    public AjaxResult list(AdCarousel adCarousel)
    {
        adCarousel.setDelFlag("0");
        adCarousel.setStatus(0L);
        startPage();
        List<AdCarousel> list = adCarouselService.selectAdCarouselList(adCarousel);
        return AjaxResult.success(getDataTable(list));
    }

}
